package com.durian.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.durian.domain.DTO.ObsDefaultListDTO;
import com.durian.domain.DTO.ObsOrderListOnUserDTO;
import com.durian.domain.VO.ObsOrderBookListVO;
import com.durian.domain.VO.ObsOrderVO;
import com.durian.domain.entity.ObsOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 订单表 Mapper
 *
 * @author Durian
 * @since 2023-11-23
 */
@Mapper
public interface ObsOrderMapper extends BaseMapper<ObsOrder> {

    /**
     * 获取订单列表
     *
     * @param defaultListDTO 基础分页DTO
     * @return ObsOrderBookListVO集合
     */
    List<ObsOrderVO> listOrder(@Param("defaultListDTO") ObsDefaultListDTO defaultListDTO);

    /**
     * 根据用户获取订单列表
     *
     * @param listOnUserDTO ObsOrderListOnUserDTO
     * @return ObsOrderBookListVO集合
     */
    List<ObsOrderBookListVO> listOrderOnUser(@Param("listOnUserDTO") ObsOrderListOnUserDTO listOnUserDTO);

}
